Modifications for k8s to run - #892
Conversation
Signed-off-by: munapower <mmunaro@hotmail.com>
Signed-off-by: munapower <mmunaro@hotmail.com>
Signed-off-by: munapower <mmunaro@hotmail.com>
…loyment descriptor specific for Mac M1 Signed-off-by: munapower <mmunaro@hotmail.com>
Signed-off-by: munapower <mmunaro@hotmail.com>
Signed-off-by: munapower <mmunaro@hotmail.com>
Signed-off-by: munapower <mmunaro@hotmail.com>
…e containers Signed-off-by: munapower <mmunaro@hotmail.com>
Signed-off-by: munapower <mmunaro@hotmail.com>
mbrandenburger
left a comment
There was a problem hiding this comment.
Thank you @munapower for creating this PR! I think this PR goes into the right direction and even brings some color into our terminals :)
Once, the example is running again - please remove the commented out lines which are not needed anymore.
| FABRIC_BIN_DIR="${FABRIC_BIN_DIR:-${FABRIC_PATH}/build/bin}" | ||
| FABRIC_BIN_DIR="${FPC_PATH}/fabric/_internal/bin" |
There was a problem hiding this comment.
should it be better FABRIC_BIN_DIR="${FABRIC_BIN_DIR:-${FPC_PATH}/fabric/_internal/bin}"
| C_RESET='\033[0m' | ||
| C_RED='\033[0;31m' | ||
| C_GREEN='\033[0;32m' | ||
| C_BLUE='\033[0;34m' | ||
| C_YELLOW='\033[1;33m' | ||
| # successln echos in green color | ||
| function successln() { | ||
| println "${C_GREEN}${1}${C_RESET}" | ||
| } |
There was a problem hiding this comment.
I like a bit of color :)
There was a problem hiding this comment.
we are just using green in this script?
| rm -rf ${cryptoConfigDir} | ||
| rm -rf ${channelArtifactsDir} | ||
| rm -rf ${packageDir} | ||
| rm -rf $cryptoConfigDir | ||
| rm -rf $channelArtifactsDir | ||
| rm -rf $packageDir |
There was a problem hiding this comment.
I guess we are not really have a strong consistent use of variable with an without {}. However, if we would like to remove them here, shouldn't we do it in the entire script? WDYT?
| minikube image load fpc/ercc:latest | ||
| minikube image load fpc/fpccc:latest | ||
| minikube image load fpc/fpcclient:latest |
There was a problem hiding this comment.
Do we need to update our minicube version as well in order to use image load instead of cache add?
| - name: GATEWAY_CONFIG | ||
| value: /opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/peerOrganizations/org1/connection.yaml | ||
| - name: ORG | ||
| value: org1 |
There was a problem hiding this comment.
Missing CORE_PEER_ORG_NAME env. var.
+ - name: CORE_PEER_ORG_NAME
+ value: org1
can be applied to other orgs as well
| @@ -32,9 +46,9 @@ CRYPPTOGEN_CMD="${FABRIC_BIN_DIR}/cryptogen" | |||
| CONFIGTXGEN_CMD="${FABRIC_BIN_DIR}/configtxgen" | |||
There was a problem hiding this comment.
The script currently depends on an externally set FABRIC_CFG_PATH, which may point to an incorrect location if the user has a prior Fabric setup. (For me it was pointing -> /home/psychopunk_sage/dev/Workplace/LFX/fabric-samples/config/)
We should consider explicitly setting it within the script to ensure consistency:
something like this:
export FABRIC_CFG_PATH="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"This makes the script independent of the user’s environment and avoids configuration issues.
| CC_TYPE="external" | ||
| function packageChaincode() { | ||
|
|
||
| address="{{.peername}}_${CC_NAME}_ccaas:${CHAINCODE_SERVER_PORT}" |
There was a problem hiding this comment.
- address="{{.peername}}_${CC_NAME}_ccaas:${CHAINCODE_SERVER_PORT}"
+ address="${CC_NAME}-${1}:${CHAINCODE_SERVER_PORT}"reason: The {{.peername}} template resolves to the peer's ID at runtime (e.g. peer0-org1), producing peer0-org1_fpccc_ccaas:9999, which has no matching Kubernetes service and uses underscores invalid in DNS. Since generate.sh already creates one package per peer (loop variable $1 = peer name), the address can be hardcoded to match the k8s service naming convention ${CC_NAME}-${peer}:9999 (e.g. fpccc-peer0-org1:9999).
What this PR does / why we need it:
fixes k8s sample
Which issue(s) this PR fixes:
Fixes #926
Special notes for your reviewer:
Does this PR introduce a user-facing changes and/or breaks backward compatability?:
yes, changes to readme